package com.mybatis;

import com.mybatis.dao.CustomerDao;
import com.mybatis.entity.Customer;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MybatisTest {
    @Test
    public void mybatisTest(){
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");
        CustomerDao customerDao= (CustomerDao) applicationContext.getBean("customerDao");
        Customer customer=customerDao.findCustomerById(1);
        System.out.println(customer);
    }
}
